package com.amir.common.utils.image

open class ImageTransform {
    companion object {
        fun cut(x: Int, y: Int, width: Int, height: Int, maxImageWidth: Int): ImageTransform? {
            return ImageCut(x, y, width, height, maxImageWidth)
        }

        fun scale(w: Int, h: Int, keepProportion: Boolean): ImageScale? {
            return ImageScale(w, h, keepProportion)
        }
    }
}

class ImageCut(
    val x: Int,
    val y: Int,
    val width: Int,
    val height: Int,
    val maxImageWidth: Int
) : ImageTransform()

class ImageScale(val width: Int, val height: Int, val isKeepProportion: Boolean) : ImageTransform()